package in.muton.edushare.imageProcessor;

import java.util.ArrayList;

import com.edushare.common.constants.ConfigPropertyName;
import com.edushare.common.global.SystemGlobals;
import com.edushare.common.vo.FileUploadInfo;

/**
 * Image process handling singleton
 * @author Naishe
 *
 */
public class ImageProcessManager {
	
	private static int threadCount;
	public static final int maxThreadCount = 10;/*Integer.parseInt(
												SystemGlobals.getInstance().
												getConfigProperty
												(ConfigPropertyName.IMAGE_PROCESSOR_MAX_THREADS));*/
	private static final ArrayList<FileUploadInfo> unprocessedFiles = new ArrayList<FileUploadInfo>();
	
	

	public static void setThreadCount(int threadCount) {
		ImageProcessManager.threadCount = threadCount;
	}

	public static int getThreadCount() {
		return threadCount;
	}
	
	public static String status(){
		return "Media Processor Running threads " + threadCount + "/" + maxThreadCount;
	}
	
	private ImageProcessManager(){}
	
	synchronized public static void addToProcessQueue(FileUploadInfo fuvo){
		unprocessedFiles.add(fuvo);
	}
	
}
